package View.ObjectViews;

public class PropietarioView
{
	//Atributos
	private String cuit;
	private String razonSocial;
	
	//Getters
	public String getCuit() 
	{
		return cuit;
	}
	public String getRazonSocial() 
	{
		return razonSocial;
	}
	
	//Setters
	public void setCuit(String cuit) 
	{
		this.cuit = cuit;
	}
	public void setRazonSocial(String razonSocial) 
	{
		this.razonSocial = razonSocial;
	}
	
	//El combo usa este metodo para saber que debe mostrar
	public String toString() 
	{
		return razonSocial + " (CUIT: " + cuit + ")";
	}
	
	//El combo usa este metodo para saber que valor devolver
	public boolean equals(Object toCompare)
	{
		if(toCompare == null)
			return false;
		
		try
		{
			PropietarioView toCompareView = (PropietarioView)toCompare;
			return toCompareView.getCuit().equals(this.getCuit());
		}
		catch(Exception ex)
		{
			return false;
		}
	}
}
